var entity = require('../entity');
var Creditspolicy = entity.Creditspolicy;


exports.newAndSave = function(content, callback){
    var creditspolicy = new Creditspolicy();
    creditspolicy.content = content;
    creditspolicy.save(function(err, csp){
        callback(err, csp);
    })
}

exports.findById = function(id, callback){
    Creditspolicy.findOne({_id: id}).exec(function(err, csp){
        callback(err, csp);
    })
}